In an image forming apparatus, detection should be made as to whether a recording medium such as a sheet of paper has passed a specified position or is present on a manual feed tray.
Some image forming apparatuses include a photo sensor and a sensor actuator. The photo sensor has a light emitting element and a light receiving element, which are disposed facing each other. The sensor actuator has a light path shielding plate that moves between a position where the light path shielding plate cuts off a light path from the light emitting element to the light receiving element and a position where the light path shielding plate opens the light path. Based on an output signal from the photo sensor, the presence of a recording medium in the manual feed tray is detected.